<div class="modal fade" id="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <style>
      .modal-dialog{
        width:681px;
      }
    </style>
    <div class="modal-content">
        <div class="modal-header" style="background:#3C8DBC;color:#fff">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">新增内容1</h4>
        </div>
        <form name="form" novalidate ng-submit="postForm()">
            <div class="modal-body" ng-if="state!='subject'&&state!='category'&&state!='major'">
                <div class="form-group" ng-if="state!='material'&&state!='briefing'">
                    <label for="">信息来源</label>
                    <input type="text" name="informationSources" ng-model="informationSources"  class="form-control" placeholder="非必填项">
                </div>
                <div class="form-group" ng-if="state!='material'&&state!='briefing'">
                    <label for="">创建时间</label>
                    <input type="text" name="createTime"ng-model="createTime"  class="form-control" placeholder="例如：时间格式：2017/05/18，不填默认当前服务器时间">
                </div>
                <div class="form-group" ng-if="state!='material'&&state!='briefing'">
                    <label for="">点击数</label>
                    <input type="text" name="pageViews"  ng-model="pageViews" class="form-control" placeholder="必须为数字，否则上传失败">
                </div>
                <div class="form-group" ng-if="state!='material'&&state!='briefing'">
                    <label for="">文章标题</label>
                    <input type="text" name="title" placeholder="必填项" ng-model="title" class="form-control">
                </div>
                <input type="hidden" name="newsType"  value="{{type}}" >
                <div class="form-group" ng-if="state!='material'&&state!='briefing'">
                    <label for="">文章内容</label>
                    <editor-directive data="detail"></editor-directive>
                </div>
                <div class="form-group" ng-if="state=='material'||state=='briefing'">
                    <label for="">文章标题</label>
                    <input type="text" name="title" placeholder="必填项" ng-model="title" class="form-control">
                </div>
                <div class="form-group" ng-if="state=='material'||state=='briefing'">
                  <input type="file"  name="detail" class="form-controller">
                </div>
            </div>
            <div class="modal-body" ng-if="state=='subject'||state=='category'||state=='major'">
                <div class="form-group" ng-if="state=='subject'">
                    <input type="hidden" name="id" value="{{id}}" ng-if="status=='edit'">
                     <input type="hidden" name="elevel" value="{{type}}" ng-if="status=='add'">
                    <label for="">学科门类</label>
                    <input type="text" name="ename" placeholder="必填项" ng-model="ename" class="form-control">
                </div>
                
                <!--<div class="form-group" ng-if="state=='category'">
                    <label for="">学科门类</label>
                    <select name="" id="" class="form-control">
                        <option value="">1111</option>
                    </select>
                </div>-->
                <div class="form-group" ng-if="state=='category'&&status=='add'">
                    <label for="">学科门类</label>
                   
                    <select name="pcode" id="" class="form-control">
                        <option value="">请选择学科门类</option>
                        <option value="{{item.ecode}}" ng-repeat="item in majorData">{{item.ename}}</option>
                    </select>
                    
                   
                </div>
                <input type="hidden" name="id" value="{{id}}" ng-if="state=='category'&&status=='edit'">
                <div class="form-group" ng-if="state=='category'">
                    <label for="">专业类别</label>
                    <input type="text" name="ename" placeholder="必填项" ng-model="ename" class="form-control">
                </div>
                <input type="hidden" name="elevel" value="{{type}}" ng-if="state=='category'&&status=='add'">

                <div class="form-group" ng-if="state=='major'&&status=='add'">
                    <label for="">学科门类</label>
                    <select   ng-model="subject" class="form-control" ng-change="change(subject)">
                        <option value="">请选择学科门类</option>
                        <option value="{{item.ecode}}" ng-repeat="item in majorData">{{item.ename}}</option>
                    </select>
                </div>

                <div class="form-group" ng-if="state=='major'&&status=='add'">
                    <label for="">专业类别</label>
                    <select name="pcode" id="" class="form-control">
                        <option value="">请选择学科门类</option>
                        <option value="{{item.ecode}}" ng-repeat="item in category">{{item.ename}}</option>
                    </select>
                </div>
                <div class="form-group" ng-if="state=='major'">
                    <label for="">专业名称</label>
                    <input type="text" name="ename" placeholder="必填项" ng-model="ename" class="form-control">
                </div>
                <input type="hidden" name="id" value="{{id}}" ng-if="state=='major'&&status=='edit'">
                <input type="hidden" name="elevel" value="{{type}}" ng-if="state=='major'&&status=='add'">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="submit" class="btn btn-primary" >保存</button>
            </div>
        </form>
      </div>
   </div>
</div>